package com.businessportal.web.common.longtask.tasks;

import com.businessportal.web.notifications.email.MailGunClient;

/**
 * Created by Vadim on 11/27/14.
 */
public class EmailTask implements Runnable {

    public String emailAddress;
    public String subjectText;
    public String bodyText;

    public EmailTask(String emailAddress, String subjectText, String bodyText){
        this.emailAddress = emailAddress;
        this.subjectText = subjectText;
        this.bodyText = bodyText;
    }

    @Override
    public void run() {
        try{
            MailGunClient mgClient = new MailGunClient(emailAddress, subjectText, bodyText);
            mgClient.Execute();
        }catch(Exception e){
            System.out.println(e.getMessage());
        }
    }
}
